package interfaceCommonTest;

public class Do extends Gongxing{
	
	Texing t;
	
	public void dosome(Person p){
		
		eat(p);
		
		switch(p.getAge()){
		case 1:
			t = new PlayPingpang();
			t.play(1);
			break;
		case 2:
			t = new PlayBasketball();
			t.play(2);
			break;
		}
		
	}
	
	
}
